feat: serve-only vite plugin mode (translate: false) - #6
Merged
Conversation
… builds The plugin can now serve the virtual translation modules from committed locale JSON files without extracting, translating, or writing anything. model becomes optional and is validated only when translation runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
translate?: boolean(defaulttrue) to the vite plugin config. Whenfalse:buildStartis a no-op: no extraction, no AI calls, no file writesmodelis no longer required (now optional in the config type; validated with a clear error when translation mode runs without it)virtual:solid-translate,/lazy,/locale/<l>) still serve the committed locale JSONsMotivation: large apps want hermetic, deterministic builds — extraction/translation run exclusively through the CLI (locally or in CI), while dev/preview/prod builds only consume committed locale files. Without this, a stale lock fails the build (by design, post-#3) even in pipelines that should never translate.
Includes tests for both the no-op path and the missing-model error.
🤖 Generated with Claude Code